package Service;

import Utils.PacketUtils;
import org.json.JSONObject;

/**
 * The type Update per info.
 *
 * @author dzr
 * @version 1.0
 */
public class UpdatePerInfo {
    /**
     * The constant UPDATE_PER_INFO.
     */
    public static final int UPDATE_PER_INFO = 6;

    /**
     * Update user's information.
     *
     * @param uid       the uid
     * @param profileID the profile id
     * @param username  the username
     * @param sex       the sex
     * @param birthday  the birthday
     */
    public static void updatePerInfo(int uid, int profileID, String username, String sex, String birthday){
        JSONObject ret2Server = new JSONObject();
        ret2Server.put("cmd", UPDATE_PER_INFO);
        ret2Server.put("uid", uid);
        ret2Server.put("profileID", profileID);
        ret2Server.put("username", username);
        ret2Server.put("sex", sex);
        ret2Server.put("birthday", birthday);

        PacketUtils.sendPacket(ret2Server);
    }
}
